/**
* @file kheap.h
* Manages memory allocation over heap for whole kernel.
*
* Copyrights 2011 Michal Saman, m.saman@designplus.cz.
* This source code is release under the Apache License 2.0.
* http://www.apache.org/licenses/LICENSE-2.0
*/

#ifndef _KHEAP_H
#define _KHEAP_H

#include <stdint.h>
#include <mem/allocator.h>

#define KHEAP_INIT_SIZE			0xA00000	// 10 Mb
#define KHEAP_VIRT_BASE			0x40000000	// place it on 1 GB (virt)

extern heap_t* _kheap;

extern void kheap_init();
extern uint32_t kmalloc(size_t size);
extern uint32_t kmalloc_p(size_t size, bool page_align, uint32_t* phys_addr);
extern void kfree(void *p);
extern void kheap_status();

#endif
